<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="base" uri="http://qdbp.gitee.io/tags/base/"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<table class="x-datagrid main-datalist"
		data-options="toolbar:'.toolbar-box',
		method:'POST',url:'<base:url href='actions/operate/record/list.json' />',
		fixedParams:{ordering:'createTime desc'},
		idField:'id', xextra:true">
	<thead>
		<tr>
			<th data-options="field:'id',width:100,align:'center',hidden:true">ID</th>
			<th data-options="field:'details',width:60,align:'center',xtemplate:'DETAILS'">详情</th>
			<th data-options="field:'createTime',width:150,align:'center'">时间</th>
			<th data-options="field:'userId',width:220,align:'center'">用户编号</th>
			<th data-options="field:'userName',width:100,align:'center'">用户姓名</th>
			<th data-options="field:'ip',width:120,align:'center'">IP</th>
			<th data-options="field:'project',width:60,align:'center'">工程</th>
			<th data-options="field:'executeDesc',width:300,align:'center'">操作描述</th>
			<th data-options="field:'requestUrl',width:240,align:'left',halign:'center',formatter:format.requestUrl">请求地址</th>
			<th data-options="field:'executeTime',width:75,align:'center'">时长(毫秒)</th>
			<th data-options="field:'returnType',width:50,align:'center',formatter:format.returnCode">成功</th>
			<%-- <th data-options="field:'processState',width:70,align:'center',xextra:'LogProcessState',xpopup:'handle-{processState}',xoptions:{fillData:{id:'ids'}}">处理状态</th> --%>
			<!-- <th data-options="field:'options',width:70,align:'center',formatter:format.attachment">附件</th> -->
		</tr>
	</thead>
</table>

<div class="hide">

	<div class="x-dialog container-fluid" title="详情" data-options="xpopup:'details',width:900,modal:true,iconCls:'fa fa-file-text-o'">
		<form class="pure-box form-horizontal" method="POST" action="<base:url href='actions/area/update.json'/>">
			<dd>
				<input type="hidden" name="id" />
				<div class="spacer-right">
					<div class="form-group">
						<div class="col-md-2 control-label">操作描述</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="executeDesc" data-options="readonly:true"/></div>
						<div class="col-md-2 control-label">时间</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="createTime" data-options="readonly:true"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">用户</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="userName" data-options="readonly:true"/></div>
						<div class="col-md-2 control-label">IP</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="ip" data-options="readonly:true"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">执行时长(毫秒)</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="executeTime" data-options="readonly:true"/></div>
						<div class="col-md-2 control-label">返回码</div>
						<div class="col-md-4 control-input"><input class="x-textbox" type="text" name="returnCode" data-options="readonly:true"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">来源地址</div>
						<div class="col-md-10 control-input"><input class="x-textbox" type="text" name="refererUrl" data-options="readonly:true"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">请求地址</div>
						<div class="col-md-10 control-input"><input class="x-textbox" type="text" name="requestUrl" data-options="readonly:true"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">请求参数</div>
						<div class="col-md-10 control-input"><input class="x-textbox" type="text" name="requestParams" data-options="readonly:true,multiline:true,height:80"/></div>
					</div>
					<div class="form-group">
						<div class="col-md-2 control-label">响应内容</div>
						<div class="col-md-10 control-input"><input class="x-textbox" type="text" name="returnContent" data-options="readonly:true,multiline:true,height:125"/></div>
					</div>
				</div>
			</dd>
		</form>
		<div class="dialog-button">
			<a href="javascript:void(0)" class="x-linkbutton" data-options="xaction:'close',iconCls:'fa fa-close'">取消</a>
		</div>
	</div>
	
	<div class="toolbar-box">
		<form class="toolbar-collapse">
			<div class="panel-tool">
				<a href="javascript:void(0)" class="accordion-collapse accordion-expand"></a>
			</div>
			<div class="toolbar-item">
				<input type="hidden" name="deptCodeStarts" />
				<span class="toolbar-text">用户编号:</span><input type="text" name="userId" class="x-textbox panel-input"/>
				<span class="toolbar-text">操作:</span><input type="text" name="executeDesc" class="x-textbox panel-input"/>
				<span class="toolbar-text">结果:</span><input type="text" name="returnType" class="x-combobox panel-input" data-options="editable:false,xextra:{field:'LogResultType',prepend:{key:'',value:'全部'}},onChange:xfn.toolbar.search"/>
				<a href="javascript:void(0)" class="x-linkbutton" data-options="xaction:'search',iconCls:'fa fa-search'">查询</a>
				<a href="javascript:void(0)" class="x-linkbutton" data-options="xaction:'reset'<%--,iconCls:'fa fa-circle-thin'--%>">重置</a>
				<!-- <a href="javascript:void(0)" class="x-linkbutton" data-options="xpopup:'follow',selection:'multi',enableWith:{processState:'UNPROCESSED'},iconCls:'fa fa-bell-o',fillData:{id:'ids',i:'.records'}">标记</a> -->
				<!-- <a href="javascript:void(0)" class="x-linkbutton" data-options="xpopup:'cancelFollow',selection:'multi',enableWith:{processState:'PROCESSED'},iconCls:'fa fa-bell-slash-o',fillData:{id:'ids',i:'.records'}">取消标记</a> -->
				<div class="clear"></div>
			</div>
			<div class="toolbar-more" style="width:1000px;">
				<div class="toolbar-item">
					<span class="toolbar-text">用户姓名:</span><input type="text" name="userName" class="x-textbox panel-input"/>
					<span class="toolbar-text">工程:</span><input type="text" name="project" class="x-textbox panel-input"/>
					<span class="toolbar-text">时间:</span><input type="text" name="createTimeMin" style="width: 165px;" class="x-datetimebox panel-input" data-options="editable:false"/>-<input type="text" name="createTimeMax"  style="width: 165px;" class="x-datetimebox panel-input" data-options="editable:false"/>
					<div class="clear"></div>
				</div>
				<div class="toolbar-item">
					<span class="toolbar-text">请求地址:</span><input type="text" name="requestUrl" class="x-textbox panel-input"/>
					<span class="toolbar-text">参数:</span><input type="text" name="requestParams" class="x-textbox panel-input"/>
					<span class="toolbar-text">时长:</span><input type="text" name="executeTimeMin" class="x-numberbox panel-input" data-options="min:0"/>-<input type="text" name="executeTimeMax" class="x-numberbox panel-input" data-options="min:0"/>
					<span class="toolbar-text">响应内容:</span><input type="text" name="returnContent" class="x-textbox panel-input"/>
					<div class="clear"></div>
				</div>
				<div class="toolbar-item">
					<span class="toolbar-text">会话分组:</span><input type="text" name="groups" class="x-textbox panel-input"/>
					<span class="toolbar-text">类型:</span><input type="text" name="requestType" class="x-combobox panel-input" data-options="editable:false,xextra:{field:'LogRequestType',prepend:{key:'',value:'全部'}},onChange:xfn.toolbar.search"/>
					<span class="toolbar-text">标记:</span><input type="text" name="processState" class="x-combobox panel-input" data-options="editable:false,xextra:{field:'LogProcessState',prepend:{key:'',value:'全部'}},onChange:xfn.toolbar.search"/>
					<span class="toolbar-text">IP:</span><input type="text" name="ip" class="x-textbox panel-input"/>
					<div class="clear"></div>
				</div>
			</div>
			<div class="clear"></div>
		</form>
	</div>
</div>

<script type="DETAILS">
	<a class="click-open-xpopup" data-options="xpopup:'details'">详情</a>
</script>

<script src="<base:url href='assets/${pv.view}.js'/>"></script>
